﻿#include "hzpch.h"
#include "FrameBuffer.h"

#include "SourceCode/Renderer/Renderer.h"
#include "SourceCode/Platforms/OpenGL/OpenGLFrameBuffer.h"

namespace Hazal
{
	Ref<CFrameBuffer> CFrameBuffer::Create(const SFrameBufferSpecification& spec)
	{
		switch (CRenderer::GetAPI())
		{
		case CRendererAPI::API::OpenGL:
			return CreateRef<COpenGLFrameBuffer>(spec);
		default:
			HZ_CORE_ASSERT(false, "RendererAPI::None is not supported!");
			return nullptr;
		}

		return nullptr;
	}
}
